﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OracleProvider.Enums
{
    /// <summary>
    /// Use Oracle Connection String Booleans as Flags
    /// </summary>
    [Flags]
    public enum OracleFlags
    {
        /// <summary>
        /// if only None selected, all boolean settings will be set to false. Not recomended.
        /// </summary>
        None = 0,
        /// <summary>
        /// Within a .NET stored procedure, an implicit database connection is available for use to access Oracle data. 
        /// This implicit database connection should be used rather than establishing a user connection because the 
        /// implicit database connection is already established by the caller of the .NET stored procedure, thereby minimizing resource usage.
        /// 
        /// To obtain an OracleConnection object in a .NET stored procedure that represents the implicit database connection, set the 
        /// ConnectionString property of the OracleConnection object to "context connection=true" and invoke the Open method. 
        /// No connection string attributes can be used with "context connection=true", except the Statement Cache Size attribute
        /// 
        /// <seealso cref="http://docs.oracle.com/html/E10927_01/extenRest.htm"/>
        /// </summary>
        ContextConnection = 1 << 0,
        /// <summary>
        /// Enables ODP.NET connection pool to proactively remove connections from the pool when an 
        /// Oracle RAC service, service member, or node goes down. Works with RAC, Data Guard, or a single database instance.
        /// Default Value: False
        /// </summary>
        HAEvents = 1 << 1,
        /// <summary>
        /// Enables ODP.NET connection pool to balance work requests across Oracle RAC instances based on the load balancing advisory and service goal.
        /// Default Value: False
        /// </summary>
        LoadBalancing = 1 << 2,
        /// <summary>
        /// Caches metadata information.
        /// Default Value: True
        /// </summary>
        MetadataPooling = 1 << 3,
        /// <summary>
        /// Retrieval of the password in the connection string.
        /// Default Value: False
        /// </summary>
        PersistSecurityInfo = 1 << 4,
        /// <summary>
        /// Enables or disables connection pooling
        /// Default Value: True
        /// </summary>
        Pooling = 1 << 5,
        /// <summary>
        /// ODP.NET applications can be self-tuned for performance optimization. ODP.NET dynamically monitors application queries during runtime.
        /// </summary>
        SelfTuning = 1 << 6,
        /// <summary>
        /// Statement cache purged when the connection goes back to the pool.
        /// Default Value: False
        /// </summary>
        StatementCachePurge = 1 << 7,
        /// <summary>
        /// Validation of connections coming from the pool.
        /// Default Value: False
        /// </summary>
        ValidateConnection = 1 << 8
    }
    /// <summary>
    /// Oracle allows database administrators to connect to an Oracle Database with either SYSDBA or SYSOPER privileges.
    /// </summary>
    public enum OracleDBAPrivilege
    {
        /// <summary>
        /// Reset Oracle DBA Privelege
        /// </summary>
        None,
        /// <summary>
        /// Use SYS DBA connection Privelege
        /// </summary>
        SYSDBA,
        /// <summary>
        /// Use SYS Operator connection privelege.
        /// </summary>
        SYSOPER
    }
    /// <summary>
    /// Oracle Enlist options.
    /// </summary>
    public enum OracleEnlist
    {
        /// <summary>
        /// Reset Enlist setting.
        /// </summary>
        None,
        Dynamic,
        True,
        False,
        Yes,
        No
    }
}
